
package com.ttomato.game.framework.math;

public class Circle {
    public final Vector2 mCenter = new Vector2();
    public float mRadius;

    public Circle(float x, float y, float radius) {
        mCenter.set(x, y);
        mRadius = radius;
    }

    public boolean overlapCircles(Circle c1, Circle c2) {
        float distance = c1.mCenter.distSquared(c2.mCenter);
        float sumRadius = c1.mRadius + c2.mRadius;
        return distance <= sumRadius * sumRadius;
    }
}
